This invention relates to the art of computer programming, and more specifically, to systems that execute user defined rules.
A problem in the art of systems that execute user defined rules is that once the rule base is written, it is not easy to change all of the rules in a substantially uniform manner. Prior art approaches to changing all of the rules include the changing of all the rules individually, or changing the engine that executes the rules so as to apply a change to each of the rules. The former approach is difficult and time consuming, especially if the rules may be generated dynamically during operation of the rule executing engine. The latter approach suffers from the drawback that for each change of all of the rules that is desired a change must be made to the rule executing engine. Having to change the rule executing engine makes the system inflexible, and furthermore, changes cannot be made by the users who specify the rules because the rule executing engine is not accessible to them.
I have recognized that with essentially a single, minimal change to the rule executing engine user definable changes may be made to all of the rules in a substantially uniform manner. In particular, in accordance with the principles of the invention, the rule executing engine is modified to recognize, when present, a so-called xe2x80x9cactionwrapxe2x80x9drule, which is a rule that is expanded and executed in place of the original rule, and the original rule is placed in the context of the actionwrap rule, so that the actionwrap rule may operate upon the original rule. If the actionwrap rule is not present, the rule engine executes the original rule unmodified. An actionwrap rule may be defined to be present for some situations but not for others, and its presence or absence is defined by the user or users submitting the rules. Each defined actionwrap rule, when present, is applied in a generally uniform manner on each target rule.
In accordance with an aspect of the invention, more than one actionwrap rule may be defined for use at any one time, and the various actionwrap rules in use at one time may be independent of each-other or they may be linked. If the actionwrap rules are linked, they must be activated in the correct order as specified by the actionwrap rule writer.
In addition to use in applying uniform changes to all rules for a period of time, in accordance with an aspect of the invention, an actionwrap rule that is active may, in operation, a) distinguish between the various rule types, or even specific rules, that it receives as context, and b) provide a different processing as a function of the received rule types, or specific rule. Although the changes to the rules being executed are no longer uniform, such changes may be uniform over broad categories of rules. Furthermore, advantageously, no additional change is needed to the rule engine or to the rules themselves to effectuate such functionality. Only the actionwrap rule needs to be properly specified.